home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SPACE 1
/
SPACE - Library 1 - Volume 1.iso
/
apps
/
558
/
e_edit.txt
< prev
next >
Wrap
Text File
|
1992-03-18
|
18KB
|
311 lines
Copyright 1991 Sudden Incorporated, Rod Coleman
Editing Text
Editing text is the very essence of any text editor, and that's
certainly the case with Sudden View. Editing is where the user's fingers
spend the most time. Whether it's original text entry, or needed changes
made later, the ability to transfer the user's thoughts to the screen is
what it's all about.
Editing should not be confused with Copy, Cut, Paste and Move. These
functions are really for the arrangement of the text. If these functions
are being used to edit characters, in most cases they are misapplied.
Actual editing is best done with your hands over home row of the
keyboard. For this reason, Sudden View assigns the most common editing
functions to the Power Keys. These are simply the data keys under the
left hand in combination with the Control key. Power Keys are explained
in the Keyboard Detail section.
Editing can also be done using the conventional cursor, Delete, and
Insert keys, but the Power Keys are more effective and should be used
except for the most casual changes.
In either case, this section deals with the actual editing functions
themselves. I will cover Implied Editing Action, Deleting and Inserting,
as well as the Carriage Return, Backspace and Undo keys. Once you
understand these functions, they can be applied in any way that you find
convenient.
Implied Editing Action
As noted before, Sudden View does not have an Insert or Replace
editing mode. Editing action is implied by cursor placement. If the
cursor is over a space immediately to the left of any text, keyboard entry
will be inserted, otherwise keyboard entry will replace existing text or
spaces.
The rule may seem a little strange at first, but it actually reflects
the natural editing process. For instance, if you drop the cursor over
the h in the word hot because you want to change it to "cold", just type
in the word cold. Implied Editing Action will replace the three letters
of hot and then insert the last letter of cold without requiring you to
think about or change modes.
Let's try another example: if you want to add the word very before the
word cold, just place the cursor to the left of the "c" in "cold". Now
type a "space" and the word "very". Your done!, no modes, no confusion.
If you want to change a larger word to a smaller one, just place the
cursor at the beginning of the old word, type in the new word and then use
the Delete to end of word function.
Implied Editing Action should be effective for about 98% of the
time. Unfortunately, there will be cases that you may want to insert text
where there is no space - Insert key to the rescue. For the above
example, just hit the Insert key one time, enter the text, and then hit
the Delete key to clear any extra spaces or characters.
The Insert and Delete keys will allow you to handle any exceptions to
the rule, but there is an even more direct way to insert only one or two
characters. The Alternate key will reverse the logic of Implied Editing
Action, so that if the cursor is over a character, and you hold the
Alternate key down while you press any data key, the character will be
inserted instead of replaced. This reverse logic also works if you want
to put a quote mark (') in front of a word. The Alternate key makes quick
work of those rare exceptions.
Like most aspects of Live Editing, Implied Editing Action and its
exceptions are easier to do, than to explain. Try it a little; after a
while you won't notice it at all. You will simply be editing your text.
Deleting Text
It's commonly known that the trick to writing is not knowing what to
write; it's knowing what to delete. Since deleting is such an important
part of editing, Sudden View provides a reasonable set of delete functions
- and a way to undo them (see the Undo function below).
As mentioned before, the Delete key (or corresponding Power Key) will
delete the character under the cursor. It also moves the rest of the text
in the field to the left so that the cursor is now over the next
character.
This is a very normal way to define the Delete key, and allows the
Delete key to actually be used to do simple text arrangement. Just place
the cursor in the left margin and the Delete key will move the text field
left.
The Insert key can be used to push the field back, so between Insert
and Delete, you can adjust the position of fields. This is actually much
easier using the Move function, but it gives you an idea of how these
functions work.
Deleting to the end of word (Alternate Delete) works in the same way
as Delete Character except that it will delete all the way to the next
space. It's handy for trimming off the last part of a word that you have
just changed or quickly zapping a phrase.
Notice that other fields to the right are not affected by these first
two delete function. Delete to the end of field (Control Delete) will
change that.
If you are in non-wrapped text (gold cursor), Delete to end of field
will work like Delete to end of word except that it will go all the way to
the end of the field. If you hit it again, it will zap the next field;
well, you get the idea.
If you are in word-wrapped text (blue cursor), this function (Control
Delete) becomes Delete to end of sentence and will delete to the space
just past a period, question mark or exclamation mark. Try it, it's
handy.
There's only one more delete function left and it works very
differently from the rest. Delete line (Shift Delete) does not adjust
anything sideways. It zaps the whole line, regardless of content, type or
length. Delete line is very clean and simple.
Well that's it. Now you know how to get rid of your text; if you
need to get some of it back, read on.
Undo
Just like it says, Undo is the "but, I changed my mind" key for the
Delete functions. Just hit it once, and whatever you have just deleted
will be restored; but be careful, if you hit Undo twice, you will get two
copies of whatever you deleted.
Undo works for all four types of deletes and may contains multiple
instances of each. In other words, if you deleted five characters and
then two words, Undo will restore it all. If you move the cursor and do
more deletes, only the part deleted after the cursor was moved will be
restored.
You also may discover that you can Undo text that was replaced during
normal editing. As an example, if you change the word cold to "hot" and
follow it with a Delete to end of word to zap the last character, the undo
will restore the entire word cold even though only one character was
actually deleted. In other words, the Paste Buffer (which Undo uses)
captures changes as well as deletes.
The Undo function is just a very simple version of Copy and Paste. It
only pops the last thing that you deleted or changed; but the Paste buffer
actually contains the last twenty events containing more than three
characters. If you want to try to recover something you deleted or
changed a while ago, do the Display Buffer function. See Arranging Text.
Inserting Lines
Since inserting a space using the Insert key is so simple and natural,
I won't even bother to explain it (actually, it's described it in the
Delete section). Instead I will go right to inserting lines.
You might think that Insert Line would be as simple as Insert Space;
but since it is the key to adopting a line format, there are two different
version of Insert Line.
Shift Insert (or its Power Key) is the normal Insert Line function.
Not only does it insert a line, but it also uses the format of the line
that the cursor was on when you activated the function. This means that
if word-wrap or Tabs were set in the old line, the new line will have them
too. In general, you don't need to think about this form of Implied
Formatting; you just use it.
On the other hand, if you want to use a format from another part of
the file, try Alternate Insert (or its Power Key) after you have "adopted"
the format by selecting the model line as a block and then escaping (Esc).
Actually, a double right click or editing of any line will also adopt the
format of the line in question.
To use this adopted format, just place the cursor at the new location
and do an Alternate Insert. The new line will now have the adopted
format. If the example line was word wrapped, the new line will be too.
Again, it's easier to do, than to explain; just try it.
Carriage Return
Carriage Return is so simple that most text editing manuals don't
even bother to describe it; but Sudden View,s Implicit Formatting allows
for an enhancement of Carriage Return, so I'll fill you in on what it
does.
Normally, when the text cursor is at the end of a line of text,
Carriage Return will move the cursor to the left most margin, on the line
below, which it has just inserted. Or if it is in the middle of a text
line, it will split the line in two, putting the second half on a new
line below. Sudden View works in the same way, if you consider that a
document can have more than one column or a formatted table of text.
This means that in certain case, the action of Carriage Return will
"stay in column" instead of going all the way to the left. Also, because
columns need to be somewhat independent, a blank line is only inserted if
it is needed directly below the column.
For example, if you do a Carriage Return in word-wrapped text, cursor
placement and line splits will always occur directly below the current
column. And if there is room below the column, a new line may not be
inserted. This keeps adjacent columns from being broken up with blank
lines.
Even in non-wrapped text, this "stay in column" approach is used
except for one case. If the cursor is at the end of any non-wrapped text
field, a standard Carriage Return is done, inserting a line in every
case, and placing the cursor in the left margin of the left most field,
regardless of columns. This rule to the exception is needed for doing
horizontal entry of a table.
If you want to "stay in column" even in this case, you can do it by
doing a Shift Carriage Return. This exception to Carriage Return will
allow you to add or insert a column into a table in a vertical fashion.
This "stay in column" approach, and Shift Carriage Return exception,
allow for either horizontal or vertical progression of text entry, making
Sudden View more closely respond to the user's actions. Give it a try,
you'll see what I mean.
Backspace
Like Carriage Return, Backspace is not as simple and obvious as it
might first appear. Normally, the cursor is moved left one space, and the
character under the cursor is deleted. This is exactly what Sudden View
does, except at the beginning of lines, when it may try to "stay in
column".
With word-wrapped text, if you have just typed a word which has
wrapped to the next line, and then want to backspace, you don't want to
end up in the left margin. For continuity, Sudden View will move the
cursor back up to the end of the line above, so that you can continue
editing or typing as if the paragraph were one long line. This example
of "staying in column" is especially important if you are inputting text
from a document, and your eyes are not on the screen.
An exception is also needed when the format for a word-wrapped
paragraph is first being defined. If you begin typing some text, you can
elect to set word wrap. If you then continue entering text, it will wrap
to the next line. This is normal, but will form a paragraph with a flush
left margin.
Since you may not want a flush left margin, you can adjust the left
margin of the paragraph body by simply doing a Shift Backspace instead of
a normal Backspace once the wrap occurs. You could also Space forward to
create an "outdent" paragraph. The rest of the paragraph will have a body
margin conforming to whatever you have set it to.
There is actually one more exception where the Backspace key is
useful; but since it can be confusing with some formats, we use a
non-standard, Shift Backspace function to accomplish it.
If you do a carriage return in the middle of a text line, the line
will be split. The text to the right of the cursor will form a new line
below (see Carriage Return). This split feature of Carriage Return
occurs whether the text is word-wrapped or not.
Some older, single-column editors would allow the user to undo the
split, by re-joining the line below to the text above, using the
Backspace key. Since this action would destroy the format in a
multi-column editor, Sudden View uses Shift Backspace to accomplish this
function in a "stay in column" fashion making it work like a normal
Backspace in word-wrapped text.
This join function will work even if the text had not been split, or
indeed, even if there is not text on the lower line at all. The cursor
will simply be moved up to the end of the line above in this last case.
You can think of Shift Backspace as the reverse of the Shift Carriage
Return function defined earlier.
This join function also works with word-wrapped text, but you don't
need the "Shift". A regular Backspace will do. Since word-wrap normally
tries to "stay in column", the paragraph will move up one line. If there
is a word wrapped paragraph above, it will merge with that paragraph.
Every exception has it's exception, and this exception is no
exception. If the line above has a field of a different type from the
line the cursor is on, then the join will not occur. Shift Backspace will
not join a word-wrapped field to a non-wrapped field or vice-versa. There
are no exceptions to this exception.
In the case where there is no field above, the join will still occur,
and the line will move up. This case is handy for when you have done a
series of Shift Carriage Returns and want to move the field or paragraph
back up to where it started.
This all sounds more complicated than it really is. Just remember,
word-wrapped text stays in column; use Shift for exceptions. Non-wrapped
text does not stay in column; use Shift for exceptions. And you thought
backspace was simple and obvious.